package circle9_2_5_1;

public class Cylinder extends Circle {
	private double height = 1.0;

	public Cylinder() {
	}

	public Cylinder(double radius) {
		radius = super.getRadius();
	}

	public Cylinder(double radius, double height) {
		radius = super.getRadius();
		this.height = height;
	}

	public Cylinder(double radius, double height, String color) {
		radius = super.getRadius();
		this.height = height;
		color = super.getColor();
	}

	public double getHeight() {
		return height;
	}

	public void setHeight(double height) {
		this.height = height;
	}

	public double getVolume() {
		return super.getArea() * height;
	}

	@Override
	protected Object clone() throws CloneNotSupportedException {
		// TODO Auto-generated method stub
		Cylinder cylinder = new Cylinder(super.getRadius(), this.height, super.getColor());
		return cylinder;
	}

	@Override
	public String toString() {
		return "Cylinder"+ super.toString() +" [height=" + height + "]";
	}
	
}
